From: Jasper St. Pierre Date: Wed, 30 Oct 2013 17:05:20 +0000 (-0400) Subject: iconGrid: Actually throw programmer errors X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3141 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=17421e8a6332daa5121763d0ffee025061c9f0bc;p=gnome-shell.git iconGrid: Actually throw programmer errors This way we get a backtrace. --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 4801ac23b..64a54427f 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -423,10 +423,8 @@ const IconGrid = new Lang.Class({ }, addItem: function(item, index) { - if (!item.icon || !item.icon instanceof BaseIcon) { - log('Only items with a BaseIcon icon property can be added to IconGrid'); - return; - } + if (!item.icon instanceof BaseIcon) + throw new Error('Only items with a BaseIcon icon property can be added to IconGrid'); this._items.push(item); if (index !== undefined)